@extends('admin.index.layout')

@section('title', $title)

@section('content')
    
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                分区管理
                <small>分区编辑</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="#">分区管理</a></li>
                <li class="active">分区编辑</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title"><i class="fa fa-fw  fa-edit "></i>快速编辑分区</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
                        <form role="form" action="{{url('/admin/category/update')}}/{{$data[0] -> id}}" method="post" enctype="multipart/form-data">

                            <div class="box-body">
                                
                            {{ csrf_field() }}
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label for="exampleInputName">分区名</label>
                                    <input name="tname" type="text" value="{{ $data[0] -> tname}}" class="form-control" id="exampleInputName"
                                           placeholder="分区名">
                                </div>
                            </div>
                            <div class="form-group">
                                    <label for="exampleInputEmail1">分区图片</label>
                                    <input type="hidden" name="picture" value="{{$data[0] -> picture}}">
                                    <img width='100' src="/uploads/category/{{ $data[0] -> picture }}">
                            </div>
                                                      
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label for="exampleInputFile">分区图片上传</label>
                                    <input type="file" id="exampleInputFile" name="picture">
                                    <p class="help-block">请上传分区图片</p>
                                </div>
                            </div>
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">提交</button>
                                <button type="reset" class="btn btn-default">重置</button>
                            </div>
                        </form>
                    </div><!-- /.box -->

                  

              

                

                </div><!--/.col (left) -->
                <!-- right column -->
        </div>
    </div>

     <script type="text/javascript">
        window.onload = function()
        {
            // alert($);
            setInterval(function(){
                $('#jg').fadeOut();
                
            }, 2000);

        }

     </script>
              
@endsection